import { defHttp } from '@/utils/http/axios'

enum Api {
  ALARM_RECORD_PAGE = '/alarm/record/page',
  ALARM_TYPE_PAGE = '/alarm/type/page',
  ALARM_TYPE_ADD = '/alarm/type/add',
  ALARM_TYPE_UPDATE = '/alarm/type/update',
  ALARM_TYPE_DELETE = '/alarm/type/delete',
  ALARM_TYPE_DETAIL = '/alarm/type/detail',
  ALARM_RECORD_PROCESS = '/alarm/record/process',
  ALARM_RECORD_ADD = '/alarm/record/add',
}

export const alarmRecordProcess = (data) => defHttp.post({ url: Api.ALARM_RECORD_PROCESS, data })
export const alarmRecordAdd = (data) => defHttp.post({ url: Api.ALARM_RECORD_ADD, data })
export const alarmTypeAdd = (data) => defHttp.post({ url: Api.ALARM_TYPE_ADD, data })
export const alarmTypeUpdate = (data) => defHttp.post({ url: Api.ALARM_TYPE_UPDATE, data })
export const alarmTypeDelete = (data) => defHttp.post({ url: Api.ALARM_TYPE_DELETE, data })
export const alarmRecordPage = (params) => defHttp.get({ url: Api.ALARM_RECORD_PAGE, params })
export const alarmTypePage = (params) => defHttp.get({ url: Api.ALARM_TYPE_PAGE, params })
export const alarmTypeDetail = (params) => defHttp.get({ url: Api.ALARM_TYPE_DETAIL, params })
